from __future__ import division from visual import * dx = 0.05 g = curve(x=arange(-10,10,dx), color=color.green) scene.autoscale =0 wlth = 2.0 omega = pi t = 0.05 dt = 0.005 #### traveling wave while 1: rate(200) for pt in g.pos: pt[1]=2.5*cos(omega*t-2*pi*pt[0]/wlth) t = t+dt